home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr13 / read502.zip / READ.DOC < prev    next >
Text File  |  1995-02-15  |  12KB  |  294 lines

  1. READ.DOC
  2. 02/15/95
  3.  
  4. Program written by:
  5.                         Bruce Guthrie
  6.                         Room H-4885
  7.                         U.S. Dept of Commerce/ESA/STAT-USA
  8.                         Washington, DC 20230
  9.  
  10.                         (202) 482-3234
  11.  
  12. You may freely copy and re-distribute this program; however, the U.S.
  13. Department of Commerce neither guarantees nor assures compatibility of the
  14. program with all computer software or hardware.
  15.  
  16. Foreign users:  Please provide an Internet e-mail address in all correspondence
  17. or and just e-mail your problems to me at bgu@cu.nih.gov
  18.  
  19.  
  20. READ allows you to view any ASCII text document with 16,000 lines or less (about
  21. 900,000 bytes).  You can also search for text within a document, scroll around
  22. in the document, and split up big files into small files for printing or copying
  23. to another file.
  24.  
  25. READ supports a mouse scroll bar at the top if a compatible mouse is detected.
  26.  
  27. READ handles DOS text files (lines end with CR/LF), Mac text files (lines end
  28. with CR), or Unix text files (lines end with LF).
  29.  
  30.  
  31. Specifying parameters:
  32.  
  33. Parameters for this program can be set in the following ways.  The last setting
  34. encountered always wins:
  35.   - Read from an *.INI file (see below),
  36.   - Through the use of an environmental variable (SET READ=whatever), or
  37.   - From the command line (see "Syntax" below)
  38.  
  39.  
  40.  
  41. The READ.INI file:
  42.  
  43. READ will read a READ.INI file if one is found.  (You can specify a different
  44. file name if desired.) The file is an ASCII text file that can be created
  45. maintained by hand.  The file can consist or one or more command line
  46. parameters (only those that begin with a "/"), one statement per line.
  47.  
  48. You can use the free READINIT.EXE program to set up this READ.INI file or you
  49. can create it by hand.
  50.  
  51. The file can also contain comments which are blank lines or any line beginning
  52. with:
  53.         ;    (semi-colon)
  54.         :    (colon)
  55.         '    (quote)
  56.  
  57. READ looks for the initialization file in your default subdirectory first.  It
  58. then searches for it in the subdirectory where the executable was and then goes
  59. through your DOS path.
  60.  
  61. Passing in "/-I" or "/INULL" skips loading the INI file.  This saves some
  62. execution time as the program does not need to search your path for the file.
  63.  
  64.  
  65.  
  66. Syntax:
  67.  
  68.     READ [ filespec | @flistfile ] [ /TITLE="title" ] [ /DATE=NONE ]
  69.       [ /line ] [ /MONO | /COLOR ] [ /EGA | /VGA ] [ /-MOUSE ] [ /DOS | /-DOS ]
  70.       [ /Iinitfile | /-I ] [ /Q ] [ /PORT=port ] [ /INITT=string ]
  71.       [ /INITW=string ] [ /AFTERP=string ] [ /AFTERF=string ]
  72.       [ /COLOR=nnn nnn nnn nnn ] [ /? ]
  73.  
  74. where:
  75.  
  76. "filespec" is the file specification you want to view.  You can use a path
  77. specification and a single wildcard if you'd like.  It defaults to three
  78. wildcard selections; *.DOC, *.TXT, and *.BAT.  If more than one document in the
  79. directory matches the wildcard, you can switch back and forth between documents
  80. with Ctrl-PgUp and Ctrl-PgDn.
  81.  
  82. "@flistfile" is a text file that contains the names of any files you want READ
  83. to process.  The text file should contain one filename, with path if desired,
  84. per line.  You can include an optional title after any of the file name
  85. references (see /TITLE="title" option).
  86.  
  87. "/TITLE="title" " lets you specify an optional descriptive title to appear at
  88. the bottom of the screen instead of the file name.  The title can be up to 29
  89. characters in length unless /PAGE=NONE is specified in which case it can be up
  90. to 44 characters in length.  Multi-word titles should appear in quotation marks.
  91.  
  92. "/DATE=NONE" says to leave off the date-time stamp for the file on the status
  93. line.  This allows a user-defined title to be up to 44 characters in length.
  94.  
  95. "/line" puts line "line" at the top of the screen.  Only applicable if
  96. "filespec" (vs "@flistfile") is used.
  97.  
  98. "/MONO" (or "/-COLOR") forces the system into monochrome mode.
  99.  
  100. "/COLOR" or "/-MONO" forces the system into color mode.  This is typically the
  101. default.
  102.  
  103. "/EGA" or "/VGA" will put you in 43/50-line mode if your monitor supports this.
  104. The two options are actually synonymous (you'll get the best your monitor
  105. supports).  You can also switch to and from 25-line and 43/50-line mode within
  106. the program by using Alt-E.
  107.  
  108. "/-MOUSE" says to present the non-mouse menu bar even if a mouse is present.
  109.  
  110. "/DOS" allows access to the jump to DOS feature of the program.  This is
  111. typically the default.
  112.  
  113. "/-DOS" prohibits jumping to DOS.
  114.  
  115. "/Iinitfile" says to read an initialization file with the file name "initfile".
  116. The file specification *must* contain a period.  If no drive or path information
  117. is specified, the program will search for initfile beginning in your default
  118. subdirectory and then going throughout your DOS path.  The use of an
  119. initialization file is optional.  Initially defaults to "/IREAD.INI".
  120.  
  121. "/-I" (or "/INULL") says to skip loading the initialization file.
  122.  
  123.  
  124. "/Q" suppresses a message that shows up while the program searches for your
  125. initfile.
  126.  
  127. "/PORT=port" specifies the printer port to use for printing.  This typically
  128. defaults to /PORT=LPT1: although this can be overridden by the READ.INI file.
  129.  
  130. "/INITT=string"("initialize thin") provides the string that will be sent to the
  131. printer before printing if all lines in the document are 80 characters or less
  132. in length.  The string can include regular characters.  Special characters are
  133. entered by using their three-character ASCII numeric code preceded by a
  134. backslash.  "\027" is the code for the special character Escape.  You can
  135. specify /INITT=NULL if desired.  Defaults to "/INITT=NULL".
  136.  
  137. "/INITW=string" ("initialize wide") provides the string that will be sent to the
  138. printer before printing if any lines in the document (not just the section
  139. printed) exceed 80 characters in length.  See "/INITT=string" description.
  140. Defaults to "/INITW=NULL".
  141.  
  142. For a Hewlett-Packard LaserJet, the following codes would typically be used:
  143.         /INITT=\027E             (portrait mode, 80 column)
  144.         /INITW=\027E\027(s16.66H (portrait mode, 132 column)
  145.  
  146. "/AFTERP=string" specifies the string to print after a partial document is
  147. printed.  This string can include a page eject character ("\012") or any printer
  148. reset codes ("\012\027E") you want.  Initially defaults to "/AFTERP=\012".
  149.  
  150. "/AFTERF=string" specifies the string to print after a full document is printed.
  151. See "/AFTERP=string" description.  Defaults to "/AFTERF=\012".
  152.  
  153. "/COLOR=nnn nnn nnn nnn" specifies the color settings to use for (in order) (1)
  154. regular text, (2) the status line, (3) marked text, and (4) found text.  Each
  155. setting must consist of three digits, the first two being the foreground color
  156. and the last being the background color.  The foreground color should be padded
  157. on the left with a 0 if it is only one digit in length.  Defaults to "/COLOR=150
  158. 151 157 143".
  159.  
  160. Foreground colors:
  161.  
  162.         Low intensity           High intensity
  163.  
  164.         0 = black                8 = dark grey
  165.         1 = blue                 9 = light blue
  166.         2 = green               10 = light green
  167.         3 = cyan                11 = light cyan
  168.         4 = red                 12 = light red
  169.         5 = magenta             13 = light magenta
  170.         6 = brown               14 = light yellow
  171.         7 = white               15 = bright white
  172.  
  173. Adding 16 to any color will make the text blink.  Background colors can consist
  174. of 0 to 7 above.  Bright white on blue, for example, would be "151".
  175.  
  176. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  177.  
  178.  
  179.  
  180. Return codes:
  181.  
  182. READ returns the following ERRORLEVEL codes:
  183.         0 = no problems
  184.       254 = input file(s) not found
  185.       255 = syntax problems, or /? requested
  186.  
  187.  
  188. Viewing options:
  189.  
  190. While you're viewing a document with the READ command, you can use the following
  191. keys:
  192.  
  193. Cursor movement keys (up/down):
  194.  
  195. Up                moves up one line
  196. Down              moves down one line
  197. Home              moves to the top line of the document
  198. End               moves to the bottom line of the document
  199. PgUp              moves up one screen's worth
  200. PgDn              moves down one screen's worth
  201. #line or Gline    moves to the given line in the document (goto line)
  202. +line             moves forward a number of lines
  203. -line             moves backward a number of lines
  204.  
  205. Cursor movement keys (right/left):
  206.  
  207. Right             moves one column to the right
  208. Left              moves one column to the left
  209. Tab               moves 8 columns to the right
  210. Shift-Tab         moves 8 columns to the left
  211. Ctrl-Right        moves to the far right of the document
  212. Ctrl-Left         moves to the far left of the document
  213.  
  214.  
  215. Search for text:
  216.  
  217. \ or F or f       search for text within the document
  218.                   (the search is case-insensitive; "/COMMERCE" will find
  219.                   "Commerce", "commerce", and "COMMERCE")
  220. /                 search for exact (case-sensitive) text within the document
  221. F3                search for the next occurrence of that text
  222. F9                search for the previous occurrence of that text
  223.  
  224. Marking lines:
  225.  
  226. Alt-M             mark top line for copy or print
  227. Alt-B             mark bottom line for copy or print
  228. Alt-U             unmark all lines
  229.  
  230. Copying/printing lines (can copy/print either marked lines, all lines, or just
  231. the lines that are currently on the screen):
  232.  
  233. Alt-C or Alt-D    copy (duplicate) lines to a file
  234. Alt-P             print lines
  235.  
  236. Next/previous documents:
  237.  
  238. Ctrl-PgUp         go to the previous file viewed
  239. Ctrl-PgDn         go to the next file specified on the input line
  240.  
  241. Miscellaneous:
  242.  
  243. Alt-E             toggles between 25-line and 43-/50-line mode (if your system
  244.                   supports EGA and VGA respectively)
  245. Alt-J or Alt-G    jumps (goes) to DOS; say EXIT to get back to program;
  246.                   this feature can be turned off using the /-DOS switch
  247. Alt-R             shows ruler at the top of the listing
  248. Ctrl-P or Ctrl-F  do a form feed to the printer
  249. F1                get help screen (which also includes some other statistical
  250.                   information like the size of the file in bytes)
  251. Esc               leave READ program
  252.  
  253. Note that you can't view beyond the beginning or end of the document.  This is
  254. obvious but you cannot scroll to the right if you're already seeing the far
  255. right of the display.
  256.  
  257.  
  258.  
  259. Marking and copying text:
  260.  
  261. If you need to copy a portion of your file to the printer or to another text
  262. file, you will typically want to mark sections of the text first.  This is done
  263. using the mark functions:  Alt-M marks the top line on the screen and Alt-B
  264. marks the bottom line on the screen.
  265.  
  266. For example, you might decide that you have a 2,000-line document and you want
  267. to print 50 lines of it.  Go to the first line you want to print or copy (you
  268. can use the search options if you want to).  Get that line at either the top of
  269. the screen or the bottom of the screen.  If it's the bottom line, press Alt-B;
  270. if it's the top line, press Alt-M.
  271.  
  272. Now go to the last line you want to print or copy.  Again, get that line at
  273. either the top of the screen or the bottom of the screen and press Alt-B or
  274. Alt-M appropriately.  Having marked two lines, the program tags those lines and
  275. all those lines between them.  You can use the F1 (help) key; it will tell you
  276. the first and last lines that are marked.
  277.  
  278. Now press Alt-C (or Alt-D) to Copy the lines elsewhere or Alt-P to print them.
  279. When you select these functions, you'll be asked if you want to process the
  280. whole file, just those lines on the current screen, or the lines that are
  281. marked.  Ask for the marked lines.  If you selected Alt-C, you'll be asked for
  282. the file name to copy the lines to.  If the file already exists, you'll be
  283. allowed to overwrite the existing file or append to it.
  284.  
  285. Note that you can say "LPT1:" or "PRN:" when you're doing Alt-C in which case
  286. the text will go to the printer.  The differences between Alt-C and Alt-P are:
  287.  
  288. (1) Alt-P will remove linefeeds during printing whereas Alt-C leaves them in.
  289.     Typically, Alt-C will result in double-spaced printing.
  290.  
  291. (2) Alt-P may reset the printer based on the width of the current document if a
  292.     READ.INI file is used.
  293.  
  294.